home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Files / Locations / DirectoryID.h < prev    next >
Text File  |  2000-06-23  |  591b  |  32 lines

  1. // DirectoryID.h
  2.  
  3. #ifndef DirectoryID_h
  4. #define DirectoryID_h
  5.  
  6. #ifndef Integers_h
  7. #include "Integers.h"
  8. #endif
  9.  
  10. #include <Files.h>
  11.  
  12. class DirectoryID
  13.   {
  14.     private:
  15.         int32 id;
  16.         
  17.     public:
  18.         explicit DirectoryID( int32 value )
  19.           : id( value )
  20.           {}
  21.         
  22.         static DirectoryID Root()                        { return DirectoryID( fsRtDirID ); }
  23.         static DirectoryID AboveRoot()                { return DirectoryID( fsRtParID ); }
  24.         
  25.         int32 Number() const                                { return id; }
  26.         
  27.         bool operator==( DirectoryID f ) const        { return id == f.id; }
  28.         bool operator!=( DirectoryID f ) const        { return id != f.id; }
  29.   };
  30.  
  31. #endif
  32.